package com.cloud.feign.clients;


import com.cloud.feign.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// Feign已经自带Ribbon，自动集成了负载均衡
@FeignClient("user-service")
public interface UserClient {

    @GetMapping("/user/getUser/{userId}")
    User findById(@PathVariable("userId") Long userId);
}
